#!/bin/bash

# See if PHP is disabled enable it if so.
Disabled=`grep "#LoadModule php5_module" /etc/apache2/httpd.conf | wc -l`
if ((Disabled > 0))
then
	mv /etc/apache2/httpd.conf /etc/apache2/httpd.conf-original
	sed "s/#LoadModule\ php5_module/LoadModule\ php5_module/" /etc/apache2/httpd.conf-original >/etc/apache2/httpd.conf
fi

# See if httpd is already running and restart it if so.
Processes=`ps -A | grep httpd | grep -v grep | wc -l`
if ((Processes > 0))
then
	apachectl restart
fi
